﻿using System.Runtime.Serialization;
using System.Xml.Serialization;

namespace Cubicle.Excel.Config
{
    [DataContract]
    public class FunctionDescription : BaseDescription
    {
        public FunctionDescription() {}
        public FunctionDescription(
            string category,
            bool isHidden = false,
            bool isThreadSafe = false,
            bool isVolatile = false,
            bool isMacroType = false)
        {
            IsHidden = isHidden;
            IsThreadSafe = isThreadSafe;
            IsVolatile = isVolatile;
            IsMacroType = isMacroType;
            Category = category;
        }

        [DataMember]
        [XmlAttribute("isHidden")]
        public bool IsHidden { get; set; }

        [DataMember]
        [XmlAttribute("isThreadSafe")]
        public bool IsThreadSafe { get; set; }

        [DataMember]
        [XmlAttribute("category")]
        public string Category { get; set; }

        [DataMember]
        [XmlAttribute("isVolatile")]
        public bool IsVolatile { get; set; }

        [DataMember]
        [XmlAttribute("isMacroType")]
        public bool IsMacroType { get; set; }


    }
}